package com.sanmu.factory;

import com.sanmu.bean.Monster;

import java.util.HashMap;

/**
 * @version 1.0
 * @Author xinnian
 * @Date 2024/9/13 16:40
 * @注释
 * @create: 2024-09-13 16:40
 */

public class MyStaticFactory  {
    private static HashMap<String, Object> map = new HashMap<>();

   static  {
        map.put("monster09", new Monster(9, "sanmu", "sanmu"));
    }

    public static Monster getMonster(String key) {
        return (Monster) map.get(key);
    }
}
